import request from '@/utils/request'
export function login(data) {
    console.log('get_data', data);

    return request({
        url: '/user/login',
        method: 'post',
        data
    })
}

export function getInfo(uid) {
    return request({
        url: '/user/user',
        method: 'get',
        params: {
            'id': uid
        }
    })
}
export function getUserList() {
    return request({
        url: "/user/alluser",
        method: "get"
    })
}
export function logout() {
    return request({
        url: '/admin/acl/index/logout',
        method: 'post'
    })
}
export function updateUser(data) {
    return request({
        url: "/user/user",
        method: "put",
        data
    })
}
export function deleteUser(id) {
    return request({
        url: "/user/user",
        method: "delete",
        params: {
            'id': id
        }
    })
}